import { JsonUtil } from "db://app-game/core/utils/JsonUtil";
import { DBStaticItemsType } from "./DBStaticItems.type";

export class DBStaticItems {
  /** 表单名称 */
  static DBName = "StaticItems";
  /** 表单数据 */
  data: DBStaticItemsType = null!;

  init(id: number) {
    let db = JsonUtil.get(DBStaticItems.DBName) as DBStaticItemsType[];
    this.data = db.find((v) => v.id === id)!;
  }
}
